<template>
    <div class="form-item">
        <el-form-item :label="config.label" :required="config.require">
            <el-time-picker
                    v-model="value"
                    :placeholder="config.placeholder"
                    :is-range="config.isRange"
                    :range-separator="config.separator"
                    :start-placeholder="config.startPlaceholder"
                    :end-placeholder="config.endPlaceholder"
            >
            </el-time-picker>
        </el-form-item>
    </div>
</template>
<script>
    import Vue from 'vue';
    import {TimePicker, FormItem} from 'element-ui';

    Vue.use(TimePicker);
    Vue.use(FormItem);

    export default {
        name: 'DatePicker',
        data() {
            return {
                value: 0
            }
        },
        props: {
            config: {
                type: Object,
                default: () => {
                    return {}
                }
            }
        }
    }
</script>
<style lang="less" scoped>
    @import "timePicker.less";
</style>
